<template>
  <div class="app-container">
    <div class="search-container">
      <el-form :model="searchParam" :inline="true" label-width="90px">
        <el-form-item label="工厂">
          <el-select
            v-model="searchParam.plantId"
            clearable
            placeholder="请选择工厂"
          >
            <el-option
              v-for="item in plants"
              :key="item.id"
              :label="item.organizationCode"
              :value="item.id"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="供应商">
          <el-select
            v-model="searchParam.partnerId"
            clearable
            placeholder="请选择供应商"
          >
            <el-option
              v-for="item in partners"
              :key="item.id"
              :label="item.partnerName"
              :value="item.id"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="到货日期">
          <el-date-picker
            v-model="searchParam.arriveDateSearch"
            type="daterange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            format="YYYY-MM-DD"
            value-format="YYYY-MM-DD"
            @change="getarriveDate"
          />
        </el-form-item>
        <el-form-item label="物料编号">
          <el-input
            v-model="searchParam.materialCode"
            placeholder="请输入物料编号"
            clearable
            @keyup.enter="search"
          />
        </el-form-item>
        <el-form-item label="物料名称">
          <el-input
            v-model="searchParam.materialName"
            placeholder="请输入物料名称"
            clearable
            @keyup.enter="search"
          />
        </el-form-item>
        <el-form-item label="物料组">
          <el-select
            v-model="searchParam.materialGroupId"
            clearable
            placeholder="请选择供应商"
          >
            <el-option
              v-for="item in materialGroups"
              :key="item.id"
              :label="item.materialGroupName"
              :value="item.id"
            />
          </el-select>
        </el-form-item>
        <!-- <el-form-item label="计划状态">
          <el-select
            v-model="searchParam.orderScheduleState"
            clearable
            placeholder="请选择计划状态"
          >
            <el-option
              v-for="item in dictionaryStore.filterDictList(
                'OrderScheduleState'
              )"
              :key="item.value"
              :label="item.label"
              :value="Number(item.value)"
            />
          </el-select>
        </el-form-item> -->
        <el-form-item label="已生成包装">
          <el-select
            v-model="searchParam.isPacking"
            clearable
            placeholder="请选择已生成包装"
          >
            <el-option
              v-for="item in dictionaryStore.filterDictList(
                'PackingGenerateType'
              )"
              :key="item.value"
              :label="item.label"
              :value="Number(item.value)"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="可发货">
          <el-select
            v-model="searchParam.allowSend"
            clearable
            placeholder="请选择可发货"
          >
            <el-option
              v-for="item in dictionaryStore.filterDictList('YesNo')"
              :key="item.value"
              :label="item.label"
              :value="Number(item.value)"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="打印状态">
          <el-select
            v-model="searchParam.printState"
            clearable
            placeholder="请选择打印状态"
          >
            <el-option
              v-for="item in dictionaryStore.filterDictList('PrintState')"
              :key="item.value"
              :label="item.label"
              :value="Number(item.value)"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="发货状态">
          <el-select
            v-model="searchParam.sendState"
            clearable
            placeholder="请选择发货状态"
          >
            <el-option
              v-for="item in dictionaryStore.filterDictList('PlanSendState')"
              :key="item.value"
              :label="item.label"
              :value="Number(item.value)"
            />
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="search"
            ><i-ep-search />搜索</el-button
          >
          <el-button @click="reset"><i-ep-refresh />重置</el-button>
        </el-form-item>
      </el-form>
    </div>

    <el-card shadow="never" class="table-container">
      <!-- <template #header>
        <el-button type="primary" @click="openDialog()">
          <i-ep-plus />
          新增
        </el-button>
        <el-button
          type="danger"
          :disabled="ids.length === 0"
          @click="handleTableDelete()"
        >
          <i-ep-delete />
          批量删除
        </el-button>
        <el-button type="primary" @click="excelBoxOpen"> 导入</el-button>
        <el-button
          type="success"
          :disabled="ids.length === 0"
          @click="batchConfirm()"
        >
          批量确认
        </el-button>
        <el-button
          type="success"
          :disabled="ids.length === 0"
          @click="allowSendForBatch()"
        >
          允许发货
        </el-button>
        <el-dialog
          v-model="excelBox"
          :close-on-click-modal="false"
          :destroy-on-close="true"
          title="采购计划数据导入"
          @close="closeUploadDialog"
          width="420"
        >
          <el-row>
            <el-col :span="24" style="margin-bottom: 10px">
              <span style="margin-right: 20px">开始日期</span>
              <el-date-picker
                v-model="beginDate"
                type="date"
                style="width: 300px"
                clearable
                :disabled-date="disabledDate"
              />
            </el-col>
            <el-col :span="24">
              <span style="margin-right: 20px">结束日期</span>
              <el-date-picker
                v-model="endDate"
                type="date"
                style="width: 300px"
                clearable
                :disabled-date="disabledDate"
              />
            </el-col>
            <el-col :span="24" style="margin-top: 15px">
              <input
                class="crop-input"
                type="file"
                name="image"
                accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
                ref="onload_exl"
                @change="getfilepath"
                style="width: 315px"
              />
              <el-button
                @click="upload"
                :disabled="uploadBtn"
                style="cursor: pointer"
                >上传</el-button
              >
            </el-col>
          </el-row>
        </el-dialog>
      </template> -->

      <el-table
        ref="dataTableRef"
        v-loading="loading"
        :data="tableData"
        highlight-current-row
        border
        @selection-change="handleSelectionChange"
        :header-cell-style="{ textAlign: 'center' }"
        @sort-change="onTableSortChanged"
      >
        <el-table-column type="index" width="70" label="序号" align="center" />
        <template v-for="item in tableColumns" :key="item">
          <TableColumn v-if="item.prop && item.isShow" :column="item">
            <template v-for="slot in Object.keys($slots)" #[slot]="scope">
              <slot :name="slot" v-bind="scope"></slot>
            </template>
          </TableColumn>
        </template>
        <!-- <el-table-column
          label="供应商编号"
          prop="partnerCode"
          min-width="120"
          show-overflow-tooltip
          sortable="custom"
          align="left"
        />
        <el-table-column
          label="供应商名称"
          prop="partnerName"
          min-width="200"
          show-overflow-tooltip
          align="left"
        />
        <el-table-column
          label="物料编号"
          prop="materialCode"
          min-width="120"
          show-overflow-tooltip
          sortable="custom"
          align="left"
        />
        <el-table-column
          label="物料名称"
          prop="materialName"
          min-width="150"
          show-overflow-tooltip
          align="left"
        />
        <el-table-column
          label="到货日期"
          prop="arriveDate"
          min-width="120"
          show-overflow-tooltip
          :formatter="formatDate"
          sortable="custom"
          align="center"
        /> -->
        <!-- <el-table-column
          label="计划状态"
          prop="orderScheduleState"
          min-width="100"
          show-overflow-tooltip
          align="center"
        >
          <template #default="scope">
            {{
              useDictionary("OrderScheduleState", scope.row.orderScheduleState)
            }}
          </template>
        </el-table-column> -->
        <!-- <el-table-column
          label="已生成包装"
          prop="isPacking"
          min-width="120"
          show-overflow-tooltip
          align="center"
        >
          <template #default="scope">
            {{ useDictionary("PackingGenerateType", scope.row.isPacking) }}
          </template>
        </el-table-column>
        <el-table-column
          label="要货数量"
          prop="planQuantity"
          min-width="100"
          show-overflow-tooltip
          align="right"
        /> -->
        <!-- <el-table-column
          label="反馈数量"
          prop="agreeQuantity"
          min-width="100"
          show-overflow-tooltip
          align="right"
        />
        <el-table-column
          label="反馈时间"
          prop="replyTime"
          min-width="160"
          show-overflow-tooltip
          align="center"
        /> -->
        <!-- <el-table-column
          label="可发货"
          prop="allowSend"
          min-width="100"
          show-overflow-tooltip
          align="center"
        >
          <template #default="scope">
            <el-tag type="success" v-if="scope.row.allowSend === '1'"
              >是</el-tag
            >
            <el-tag type="info" v-else>否</el-tag>
          </template>
        </el-table-column>
        <el-table-column
          label="打印状态"
          prop="printState"
          min-width="120"
          show-overflow-tooltip
          align="center"
        >
          <template #default="scope">
            {{ useDictionary("PrintState", scope.row.printState) }}
          </template>
        </el-table-column>
        <el-table-column
          label="发货状态"
          prop="sendState"
          min-width="120"
          show-overflow-tooltip
          align="center"
        >
          <template #default="scope">
            {{ useDictionary("PlanSendState", scope.row.sendState) }}
          </template>
        </el-table-column>
        <el-table-column
          label="计划编号"
          prop="planNo"
          min-width="170"
          align="center"
          show-overflow-tooltip
        /> -->
        <!-- <el-table-column
          label="图号"
          prop="figureNumber"
          min-width="120"
          show-overflow-tooltip
          align="left"
        /> -->
        <!-- <el-table-column
          label="工厂编号"
          prop="plantCode"
          min-width="120"
          show-overflow-tooltip
        />
        <el-table-column
          label="工厂名称"
          prop="plantName"
          min-width="200"
          show-overflow-tooltip
        />
        <el-table-column
          label="卸货口"
          prop="dischargeHatchCode"
          min-width="100"
          show-overflow-tooltip
        />
        <el-table-column
          label="要货地点"
          prop="dischargeHatchName"
          min-width="180"
          show-overflow-tooltip
        />
        <el-table-column
          label="更新时间"
          prop="lastUpdateTime"
          min-width="160"
          show-overflow-tooltip
          align="center"
        />
        <el-table-column
          label="更新人"
          prop="lastUpdatedUserName"
          min-width="100"
          show-overflow-tooltip
          align="center"
        /> -->
        <!-- <el-table-column fixed="right" label="操作" width="360" align="center">
          <template #default="scope">
            <el-button
              v-if="
                scope.row.orderScheduleState < 5 &&
                scope.row.orderScheduleState != 3
              "
              type="primary"
              size="small"
              link
              @click="openDialog(scope.row)"
            >
              <i-ep-edit />
              编辑
            </el-button>
            <el-button
              v-if="scope.row.allowSend != 1"
              type="primary"
              size="small"
              link
              @click="deleteItem(scope.row.id)"
            >
              <i-ep-delete />
              删除
            </el-button>
            <el-button
              v-if="scope.row.orderScheduleState == 4"
              type="primary"
              size="small"
              link
              @click="confirm(scope.row.id)"
            >
              确认
            </el-button>
            <el-button
              v-if="scope.row.allowSend != 1"
              type="primary"
              size="small"
              link
              @click="allowSend(scope.row.id)"
            >
              允许发货
            </el-button>
            <el-button
              type="primary"
              size="small"
              link
              @click="changeRecord(scope.row)"
            >
              变更记录
            </el-button>
          </template>
        </el-table-column> -->
      </el-table>

      <el-pagination
        :background="true"
        :current-page="pageable.pageNum"
        :page-size="pageable.pageSize"
        :page-sizes="[10, 25, 50, 100]"
        :total="pageable.total"
        layout="total, sizes, prev, pager, next, jumper"
        class="mt-[20px]"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      />
    </el-card>

    <srmplanschedule-edit-query
      :visible="addDialog.visible"
      :title="addDialog.title"
      :data="addDialog.data"
      @reset-table="(id:string) => (id?.length ? getTableList() : reset())"
      :is-readonly="addDialog.readvisible"
      @change-visible="changeVisible"
    />

    <srmplanschedule-changelist-query
      :visible="logDialog.visible"
      :title="logDialog.title"
      :data="logDialog.data"
      @reset-table="(id:string) => (id?.length ? getTableList() : reset())"
      :is-readonly="logDialog.readvisible"
      @change-visible="changeLogVisible"
    />

    <el-dialog
      title="导入错误信息列表"
      v-model="errorBox"
      width="650px"
      :close-on-click-modal="false"
      :destroy-on-close="true"
      @close="closeErrorDialog"
    >
      <el-card shadow="never" class="table-container">
        <template #header>
          <el-button
            class="ml-3"
            @click="
              useDownload(
                '/mes/core/srmplanschedule/exportError',
                '导入错误信息表',
                errorDataList
              )
            "
          >
            <template #icon><i-ep-download /></template>导出</el-button
          >
        </template>

        <el-table
          ref="errorTableRef"
          v-loading="loading"
          :data="errorDataList"
          highlight-current-row
          :height="444"
          border
        >
          <el-table-column
            type="index"
            label="序号"
            width="55"
            align="center"
          />
          <el-table-column
            label="行号"
            prop="lineNo"
            min-width="70"
            show-overflow-tooltip
            align="center"
          />
          <el-table-column
            label="错误信息"
            prop="error"
            min-width="400"
            show-overflow-tooltip
          />
        </el-table>
      </el-card>
      <template #footer>
        <el-button @click="closeErrorDialog">关 闭</el-button>
      </template>
    </el-dialog>
    <!-- 列设置 -->
    <ColSetting
      v-model:col-setting="tableColumns"
      v-model:search-setting="searchColumns"
      @search-handle="(e:boolean) => (showSearch = e)"
    />
  </div>
</template>

<script setup lang="tsx">
import { useTable, useDownload, useDictionary } from "@/utils/useTable";
import request from "@/utils/request";
import { filterOrder } from "@/utils/commonHooks";
import { useDictStoreHook } from "@/store/modules/dictionary"; // 引入
const dictionaryStore = useDictStoreHook();

defineOptions({
  name: "MESSRMPLANSCHEDULEQUERY",
  inheritAttrs: false,
});

// 工厂
let plants = ref([]);
// 供应商
let partners = ref([]);
// 物料组
let materialGroups = ref([]);
// 开始时间结束时间
let beginDate = ref();
let endDate = ref();

const dialogVisible = ref(false);

// 导入excel
const uploadApi = "/mes/core/srmplanschedule/upload";
const excelBox = ref(false);
const uploadBtn = ref(false);
const uploadFile = ref("");
const fileName = ref("");

const disabledDate = (time: Date) => {
  return time.getTime() <= Date.now() - 8.64e7;
};

// 请求参数
const requestApi = "/mes/core/srmplanschedule/queryByPage";

// 是否需要分页
const pagination = true;

const initParam = reactive({ sort: {} });

// 初始化搜索参数数据
const searchParamInit = {
  plantName: "",
  partnerCode: "",
  materialCode: "",
  materialName: "",
  arriveDateSearch: [],
  arriveDateStart: "",
  arriveDateEnd: "",
  orderScheduleState: "",
};

const deleteParam = {
  api: "/mes/core/srmplanschedule/delete",
  data: {},
};

// 数据请求错误后处理
function requestError() {}

function dataCallBack(res: any[]) {}

// 表格操作 Hooks
const {
  tableData,
  pageable,
  searchParam,
  ids,
  getTableList,
  search,
  reset,
  handleSizeChange,
  handleCurrentChange,
  handleSelectionChange,
  handleTableDelete,
  loading,
}: any = useTable(
  requestApi,
  initParam,
  searchParamInit,
  pagination,
  dataCallBack.value,
  requestError,
  deleteParam
);

onMounted(() => {
  getTableList();
  getPlants();
  getPartners();
  getMaterialGroup();
});

const addDialog = reactive<DialogOption>({
  visible: false,
  readvisible: false,
  title: "",
  data: {},
});

const logDialog = reactive<DialogOption>({
  visible: false,
  readvisible: false,
  title: "",
  data: {},
});

// 供应商查询
async function getPartners() {
  const data = await request({
    url: "/mes/core/mdmpartner/getList",
    method: "post",
    data: {},
  });
  partners.value = data.data;
}

// 工厂查询
async function getPlants() {
  const { data } = await request({
    url: "system/sysOrganization/getList",
    method: "post",
    data: { organizationType: 3 },
  });
  plants.value = data;
  searchParam.value.plantId = plants.value[0].id;
}

async function getMaterialGroup() {
  const data = await request({
    url: "/mes/mdmmatgroup/getList",
    method: "post",
    data: {},
  });
  materialGroups.value = data.data;
}

// 监听表格后台排序方法
function onTableSortChanged(column: any) {
  const { prop, order } = column;
  console.log("sort column", column);
  initParam.sort = {
    column: prop,
    orderBy: filterOrder(order),
  };

  getTableList();
}

// 查询详情
async function getInfo(id: string) {
  request({
    url: `/mes/core/srmplanschedule/get/${id}`,
    method: "get",
  })
    .then((data) => {
      addDialog.data = data.data;
      addDialog.visible = true;
    })
    .catch((res) => {
      console.log(res);
    });
}

/** 打开订货计划表单弹窗 */
function openDialog(roleObj?: Object) {
  if (roleObj) {
    addDialog.title = "修改订货计划";
    getInfo(roleObj.id);
  } else {
    addDialog.title = "新增订货计划";
    addDialog.visible = true;
  }
  addDialog.readvisible = false;
}

/** 打开订货计划表单弹窗 详情 */
function openDialogdetail(roleObj?: any) {
  addDialog.title = "订货计划详情";
  getInfo(roleObj.id);
  addDialog.readvisible = true;
}

function changeVisible(value: boolean) {
  addDialog.visible = value;
  if (!value) {
    addDialog.data = {};
  }
}

function changeLogVisible(value: boolean) {
  logDialog.visible = value;
  if (!value) {
    logDialog.data = {};
  }
}

function getarriveDate(data: any) {
  if (data) {
    searchParam.value.arriveDateStart = data[0];
    searchParam.value.arriveDateEnd = data[1];
  } else {
    searchParam.value.arriveDateStart = "";
    searchParam.value.arriveDateEnd = "";
  }
}
function getreplyTime(data: any) {
  if (data) {
    searchParam.value.replyTimeStart = data[0];
    searchParam.value.replyTimeEnd = data[1];
  } else {
    searchParam.value.replyTimeStart = "";
    searchParam.value.replyTimeEnd = "";
  }
}

function confirm(id: string) {
  request({
    url: `/mes/core/srmplanschedule/batchConfirm`,
    method: "post",
    data: { ids: [id] },
  }).then((res) => {
    ElMessage.success("确认成功！");
    getTableList();
  });
}

async function batchConfirm() {
  console.log(ids.value);
  await request({
    url: "/mes/core/srmplanschedule/batchConfirm",
    method: "post",
    data: { ids: ids.value },
  }).finally(() => {
    loading.value = false;
  });
  reset();
}

function excelBoxOpen() {
  excelBox.value = true;
}

function getfilepath(e: any) {
  const file = e.target.files[0];
  fileName.value = file.name;
  uploadFile.value = file;
  uploadBtn.value = false;
}

function upload() {
  if (!uploadFile.value) {
    ElMessage({
      type: "warning",
      message: "请选择文件！",
    });
    return;
  }

  let formdata = new FormData();
  formdata.append("file", uploadFile.value);
  formdata.append("beginDate", beginDate.value);
  formdata.append("endDate", endDate.value);
  let config = { headers: { "Content-Type": "multipart/form-data" } };
  request
    .post(uploadApi, formdata, config)
    .then((res) => {
      if (res.data) {
        errorDataList.value = res.data;
        errorBoxOpen();
        closeUploadDialog();
        return;
      }
      ElMessage({
        type: "success",
        message: "上传成功！",
      });

      closeUploadDialog();
      search();
    })
    .catch((error) => {
      console.log(error);
    });
}

async function deleteItem(id: any) {
  ElMessageBox.confirm("确认删除已选中的数据项?", "警告", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type: "warning",
  }).then(async () => {
    const { data } = await request({
      url: `/mes/core/srmplanschedule/deleteItem/${id}`,
      method: "post",
    });
    search();
  });
}

/**
 * 允许发货按钮事件
 */
function allowSend(id: any) {
  request({
    url: `/mes/core/srmplanschedule/deliver`,
    method: "post",
    data: { id: id },
  }).then((res) => {
    ElMessage.success("处理成功！");
    getTableList();
  });
}

/**
 * 允许发货按钮事件
 */
function allowSendForBatch() {
  request({
    url: `/mes/core/srmplanschedule/batchDeliver`,
    method: "post",
    data: { ids: ids.value },
  }).then((res) => {
    ElMessage.success("处理成功！");
    getTableList();
  });
}

/**
 * 允许发货按钮事件
 */
function changeRecord(row: any) {
  logDialog.title = "变更记录列表";
  logDialog.data = row;
  logDialog.readvisible = false;
  logDialog.visible = true;
}

function formatDate(row, column) {
  const date = row[column.property];
  if (!date) return "";
  return date.split(" ")[0]; // 返回日期的年月日部分，而隐藏时间部分
}

const closeUploadDialog = () => {
  fileName.value = "";
  beginDate.value = "";
  endDate.value = "";
  uploadBtn.value = true;
  excelBox.value = false;
};

const errorBox = ref(false);
const errorDataList = ref([]);

function errorBoxOpen() {
  errorBox.value = true;
}

const closeErrorDialog = () => {
  errorBox.value = false;
  errorDataList.value = [];
};

const tableColumns = reactive([
  {
    prop: "partnerCode",
    label: "供应商编号",
    minWidth: 120,
    isShow: true,
    align: "left",
    sortable: "custom",
  },
  {
    prop: "partnerName",
    label: "供应商名称",
    minWidth: 200,
    isShow: true,
    align: "left",
  },
  {
    prop: "materialCode",
    label: "物料编号",
    minWidth: 120,
    isShow: true,
    align: "left",
    sortable: "custom",
  },
  {
    prop: "materialName",
    label: "物料名称",
    minWidth: 150,
    isShow: true,
    align: "left",
  },
  {
    prop: "arriveDate",
    label: "到货日期",
    minWidth: 120,
    isShow: true,
    align: "center",
    sortable: "custom",
    formatter: formatDate,
  },
  // {
  //   prop: "orderScheduleState",
  //   label: "计划状态",
  //   minWidth: 100,
  //   isShow: true,
  //   align: "center",
  //   render: (scope: any) =>
  //     useDictionary("OrderScheduleState", scope.row.orderScheduleState),
  // },
  {
    prop: "isPacking",
    label: "已生成包装",
    minWidth: 120,
    isShow: true,
    align: "center",
    render: (scope: any) =>
      useDictionary("PackingGenerateType", scope.row.isPacking),
  },
  {
    prop: "planQuantity",
    label: "要货数量",
    minWidth: 100,
    isShow: true,
    align: "right",
  },
  // {
  //   prop: "agreeQuantity",
  //   label: "反馈数量",
  //   minWidth: 100,
  //   isShow: true,
  //   align: "right",
  // },
  // {
  //   prop: "replyTime",
  //   label: "反馈时间",
  //   minWidth: 160,
  //   isShow: true,
  //   align: "center",
  // },
  {
    prop: "allowSend",
    label: "可发货",
    minWidth: 100,
    isShow: true,
    align: "center",
    render: (scope: any) =>
      scope.row.allowSend === "1" ? (
        <el-tag type="success">是</el-tag>
      ) : (
        <el-tag type="info" v-else>
          否
        </el-tag>
      ),
  },
  {
    prop: "printState",
    label: "打印状态",
    minWidth: 120,
    isShow: true,
    align: "center",
    render: (scope: any) => useDictionary("PrintState", scope.row.printState),
  },
  {
    prop: "sendState",
    label: "发货状态",
    minWidth: 120,
    isShow: true,
    align: "center",
    render: (scope: any) => useDictionary("PlanSendState", scope.row.sendState),
  },
  {
    prop: "planNo",
    label: "计划编号",
    minWidth: 170,
    isShow: true,
    align: "center",
  },
  // {
  //   prop: "figureNumber",
  //   label: "图号",
  //   minWidth: 120,
  //   isShow: true,
  //   align: "left",
  // },
  {
    prop: "plantCode",
    label: "工厂编号",
    minWidth: 120,
    isShow: true,
    align: "left",
  },
  {
    prop: "plantName",
    label: "工厂名称",
    minWidth: 200,
    isShow: true,
    align: "left",
  },
  {
    prop: "dischargeHatchCode",
    label: "卸货口",
    minWidth: 100,
    isShow: true,
    align: "left",
  },
  {
    prop: "dischargeHatchName",
    label: "要货地点",
    minWidth: 180,
    isShow: true,
    align: "left",
  },
  {
    prop: "lastUpdateTime",
    label: "更新时间",
    minWidth: 160,
    isShow: true,
    align: "center",
  },
  {
    prop: "lastUpdatedUserName",
    label: "更新人",
    minWidth: 100,
    isShow: true,
    align: "center",
  },
]);

const searchColumns = reactive([]);
</script>
